package com.yzh.homework;

/**
 * @author 于振晗
 * @title: Circle
 * @description: TODO 求点之间的距离
 * @date 2020年08月24日
 * @path com.yzh.homework
 */
public class Circle {
    int r;
    Point point;
    public Circle(int r){
        this.r = r;
        this.point = new Point(r,r);
    }

    public void verify(Point p){
        double v = Math.pow(this.point.x - p.x, 2) + Math.pow(this.point.y - p.y, 2);
        if(v<r){
            System.out.println("不在圆上");
            return;
        }
        System.out.println("在圆上面");
    }

    public static void main(String[] args) {
        Circle circle = new Circle(6);
        circle.verify(new Point(4,4));
    }
}
//定义圆心
class Point{
    int x,y;

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }
}